package main;

import java.io.Serializable;
import java.util.List;

import logic.common.game.GameMode;

import ai.AILevel;

public class GameCycle implements Serializable {
	
	private static final long serialVersionUID = 5L;
	
	private String gameName, ip;
	private List<String> maps;
	private GameMode gameMode;
	private int currentMap, respawn, countDown, maxPlayers, scoreLimit, tickets;
	private boolean bots, isOnline, balancedTeams, friendlyFire;
	private AILevel level;
	
	public GameCycle() {}
	
	public GameCycle(List<String> maps, int respawn, int countDown, int maxPlayers, boolean bots, 
			AILevel level, 	String gameName, String ip, boolean isOnline, GameMode gameMode, int scoreLimit, 
			int tickets, boolean balancedTeams, boolean friendlyFire) {
		this.respawn = respawn;
		this.countDown = countDown;
		this.maxPlayers = maxPlayers;
		this.bots = bots;
		this.level = level;
		this.gameName = gameName;
		this.ip = ip;
		this.isOnline = isOnline;
		this.gameMode = gameMode;
		this.maps = maps;
		this.scoreLimit = scoreLimit;
		this.tickets = tickets;
		this.balancedTeams = balancedTeams;
		this.friendlyFire = friendlyFire;
	}
	
	public String getNextScenario() {
		currentMap++;
		if(currentMap >= maps.size()) currentMap = 0;
		return maps.get(currentMap);
	}
	
	public int getRespawnTime() { return respawn; }
	
	public int getEndCountDown() { return countDown; }
	
	public int getMaxPlayers() { return maxPlayers; }
	
	public boolean botsEnabled() { return bots; }
	
	public String getGameName() { return gameName; }
	
	public String getIP() { return ip; }
	
	public String getCurrentMap() { return maps.get(currentMap); }
	
	public boolean isOnline() { return isOnline; }
	
	public GameMode getGameMode() { return gameMode; }
	
	public AILevel getAILevel() { return level; }
	
	public int getScoreLimit() { return scoreLimit; }
	
	public int getTickets() { return tickets; }
	
	public boolean hasBalancedTeams() { return balancedTeams; }
	
	public boolean hasFriendlyFire() { return friendlyFire; }
}